Skip to main content

Gradient Line Chart

Visualizes trends with a visually appealing gradient effect. This can enhance the visual appeal of the chart and make it easier to identify patterns and trends. It is often used to highlight trends in data that has a continuous nature, such as temperature variations or stock market fluctuations.

Chart:


Code:

  muze
.canvas()
.columns(["date"])
.rows(["temperature"])
.layers([
{
mark: "line",
encoding: {
color: "temperature",
},
},
])
.config({
axes: {
x: {
nice: false,
},
},
legend: {
color: {
range: ["#8DD3C7", "#BEBADA", "#FB8072", "#80B1D3"],
},
},
})